$OpenBSD: patch-src_gui_main_c,v 1.1 2015/07/26 05:49:37 jeremy Exp $

Part of the use-after-free fix.

--- src/gui_main.c.orig	Tue Jun  3 08:08:19 2014
+++ src/gui_main.c	Fri Jul 17 23:54:46 2015
@@ -3974,6 +3974,10 @@ timeout_callback(gpointer data) {
 		case CMD_FILEINFO:
 			while (rb_read_space(rb_disk2gui) < sizeof(fileinfo_t))
 				;
+			if (fileinfo.format_str != NULL) { /* free previous format_str, if there is one */
+				free(fileinfo.format_str);
+				fileinfo.format_str = NULL;
+			}
 			rb_read(rb_disk2gui, (char *)&fileinfo, sizeof(fileinfo_t));
 
 			sample_pos = 0;
